package com.leyou.cat.service;

import com.leyou.cat.entity.Cart;
import com.leyou.common.bean.Result;

import java.util.List;
import java.util.Map;

/**
 * @author zqq
 * @ClassName CartService
 * @Description
 * @date 2020/3/10-14:55
 */
public interface CartService {

    /**
     * @Title: addCart
     * @Description: 添加购物车信息
     * @author: zqq
     * @param cart 参数类
     * @return: com.leyou.common.bean.Result
     * @createTime: 2020-03-10 15:01
     * @version: v.1.0
     */
    Result addCart(Cart cart);

    /**
     * @Title: queryCartList
     * @Description: 查询购物车信息
     * @author: zqq
     * @param
     * @return: com.leyou.common.bean.Result<java.util.List<com.leyou.cat.entity.Cart>>
     * @createTime: 2020-03-10 15:31
     * @version: v.1.0
     */
    Result<List<Cart>> queryCartList();

    /**
     * @Title: updateCarts
     * @Description: 修改购物车
     * @author: zqq
     * @param cart 参数类
     * @return: com.leyou.common.bean.Result
     * @createTime: 2020-03-10 15:39
     * @version: v.1.0
     */
    Result updateCarts(Cart cart);

    /**
     * @Title: deleteCart
     * @Description: 删除购物车
     * @author: zqq
     * @param skuId
     * @return: com.leyou.common.bean.Result
     * @createTime: 2020-03-10 15:43
     * @version: v.1.0
     */
    Result deleteCart(String skuId);

    /**
     * @Title: mergeCart
     * @Description: 合并购物车
     * @author: zqq
     * @param cartList
     * @return: com.leyou.common.bean.Result
     * @createTime: 2020-03-24 11:43
     * @version: v.1.0
     */
    Result mergeCart(List<Cart> cartList);

    /**
     * @Title: clearCart
     * @Description: 下单之后清理购物车数据
     * @author: zqq
     * @param params
     * @return: void
     * @createTime: 2020-04-10 9:48
     * @version: v.1.0
     */
    void clearCart(Map<String,Object> params);

}
